<?php

/**
 * Created by PhpStorm.
 * User: Yieong
 * Date: 16/3/14
 * Time: 下午6:00
 */
class ApiGame
{

    public static function get($params){
        return AccAuth::getMyGame($params['userid']);
    }

    public static function getGameIdBySrc($gameSrc){
        $modGame = new ModGame();
        $game = $modGame->findByAttributes(array('GameSrc' => $gameSrc));
        return $game->GameID;
    }

    public static function getPlatformIdBySrc($platformSrc){
        $modPlatform = new ModPlatform();
        $platform = $modPlatform->findByAttributes(array('PlatformSrc' => $platformSrc));
        return $platform->PlatformID;
    }

}